<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/template/common/include/top.jsp"%>
<%@include file="/template/common/include/constant.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/template/js/gftuserfunc.js"></script>
<body>
  <div class="main1">当前的位置:权限管理</div>
    <form action="${pageContext.request.contextPath}/gftuser.x" method="post">
    <input type="hidden" name="op" value="findRight" />
      <div class="main_search">
        &nbsp;权限名称:&nbsp;<input type="text" name="f(rightName)" value="${fmap.rightName}" />
        权限描述:&nbsp;<input type="text" name="f(rightDesc)" value="${fmap.rightDesc}" />
        状态:&nbsp;
         <select name="f(status)" id="id_t_status"> 
           <option></option>
            <option value="1" <c:if test='${fmap.status == status_yes}'> selected </c:if>>正常</option> 
            <option value="2" <c:if test='${fmap.status == status_no}'> selected </c:if>>禁用</option> 
            </select>
        <input name="Submit" type="submit" class="search" value="搜索" />
      </div>
    </form>
    <!--<div class="main_list">-->
    <!--<div class="main_list_left">权限列表</div>-->
    <!--<div class="main_edit">-->
      <%--<input type="button" onclick="commit('listFrm',[['id_op','editRight']]);" value="添加" class="edit_ad" />--%>
      <%--<input type="button" onclick="if(confirm('是否要删除选中权限?')){commit('listFrm',[['id_op','deleteRight']])};" value="删除" class="edit_ad" /> --%>
    <!--</div>-->
    <!--</div>-->
    <form method="post" action="${pageContext.request.contextPath}/gftuser.x" d_op="findRight" id="listFrm">
    <input type="hidden" id="id_op" name="op" value="findRight" />
    <input type="hidden" id="id_t_id" name="t.id" />
    ${sys_searchparemeter}
    <div class="list_div">
      <table>
        <tr>
          <%--<th width="2%"><input type="checkbox" onclick="checkByName('ids',this.checked);" /></th>--%>
          <th width="30%"><a href="javascript:sort('rightName','listFrm');" id="sort_rightName" >权限名称</a></th>
          <th width="50%"><a href="javascript:sort('rightDesc','listFrm');" id="sort_rightDesc" >权限描述</a></th>
          <th width="8%"><a href="javascript:sort('status','listFrm');" id="sort_status" >状态</a></th>
          <th width="8%">操作</th>
        </tr>
        <c:forEach items="${pageBean.retList}" var="row">
        <tr>
          <%--<td><input type="checkbox" name="ids" value="${row.id}" /></td>--%>
          <td>${row.rightName}</td>
          <td>${row.rightDesc}</td>
          <td><c:choose>
              <c:when test='${row.status == status_yes}'>正常</c:when>
              <c:otherwise>禁用</c:otherwise>
            </c:choose></td>
          <td>
            <%--<a href="javascript:commit('listFrm',[['id_op','editRight'],['id_t_id','${row.id}']]);"><img src="${pageContext.request.contextPath}/template/images/cz_2.gif" alt="编辑" border="0"></a>--%>
            <a href="javascript:commit('listFrm',[['id_op','switchRightStatus'],['id_t_id','${row.id}']]);">
            <c:choose>
              <c:when test='${row.status == status_yes}'><img src="${pageContext.request.contextPath}/template/images/cz_3.gif" alt="禁用" border="0"></c:when>
              <c:otherwise><img src="${pageContext.request.contextPath}/template/images/cz_4.gif" alt="恢复" border="0"></c:otherwise>
            </c:choose>
            </a>
            <%--<a href="javascript:commit('listFrm',[['id_op','deleteRight']],check('ids','${row.id}'));" onclick="return confirm('是否要删除此条记录')"><img src="${pageContext.request.contextPath}/template/images/cz_1.gif" alt="删除" border="0"></a>--%>
        </td>
        </tr>
        </c:forEach>
      </table>
      </div>
      <div class="main_page">
        <%@include file="/template/common/include/pagefooter.jsp"%>
      </div>
    </form>    
</body>